%%% -------------------------------------------------------------------
%%%
%%% http://www.9miao.com
%%% -------------------------------------------------------------------
%% Author: adrian
%% Created: 2010-4-15
%% Description: TODO: Add description to auth_sup
-module(auth_sup).

-behaviour(supervisor).
%% --------------------------------------------------------------------
%% Include files
%% --------------------------------------------------------------------

%% --------------------------------------------------------------------
%% External exports
%% --------------------------------------------------------------------
-export([start_link/0]).

%% --------------------------------------------------------------------
%% Internal exports
%% --------------------------------------------------------------------
-export([
	 init/1
        ]).

%% --------------------------------------------------------------------
%% Macros
%% --------------------------------------------------------------------

%% --------------------------------------------------------------------
%% Records
%% --------------------------------------------------------------------

%% --------------------------------------------------------------------
%% API Functions
%% --------------------------------------------------------------------



%% ====================================================================
%% External functions
%% ====================================================================
start_link()->
	supervisor:start_link({local, ?MODULE},?MODULE, []).

%% ====================================================================
%% Server functions
%% ====================================================================
%% --------------------------------------------------------------------
%% Func: init/1
%% Returns: {ok,  {SupFlags,  [ChildSpec]}} |
%%          ignore                          |
%%          {error, Reason}
%% --------------------------------------------------------------------
init([]) ->
    {ok,{{one_for_one,10, 10}, 
		 		[
				 {gmauth_processor,
			  	 {gmauth_processor,start_link,[]},
			  	 permanent,
			  	 2000,worker,[gmauth_processor]},
				 
				 {auth_processor,
			  	 {auth_processor,start_link,[]},
			  	 permanent,
			  	 2000,worker,[auth_processor]}
				 ]}}.

%% ====================================================================
%% Internal functions
%% ====================================================================

